<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            position: relative;
            margin: 100px auto;
            width: 300px;
            height: 300px;
            transition: all 3s;
            /* 子盒子保留立体空间 */
            transform-style: preserve-3d;
        }
        .box:hover {
            transform: rotateY(180deg);
        }
        .box div {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            text-align: center;
            line-height: 300px;
            font-size: 24px;
            font-weight: 700;
        }
        .front {
            background-color: darkmagenta;
        }
        .back {
            background-color: darkorange;
            /* 旋转180度-使盒子翻转 */
            transform: rotateY(180deg);
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="front">张大鑫</div>
        <div class="back">最帅</div>
    </div>
</body>
</html>